package contestseeker.action;

import java.util.Calendar;

public class TimeString {
	
	public static String getTimeString()
	{
		Calendar calendar = Calendar.getInstance();
		int year, month, day, hour, minute, second;
		
		year = calendar.get(Calendar.YEAR);
		month = calendar.get(Calendar.MONTH) + 1;
		day = calendar.get(Calendar.DAY_OF_MONTH);
		hour = calendar.get(Calendar.HOUR_OF_DAY);
		minute = calendar.get(Calendar.MINUTE);
		second = calendar.get(Calendar.SECOND);
		
		return String.format("%d-%02d-%02d %02d:%02d:%02d", year, month, day, hour, minute, second);
	}
}
